<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>登录</title>


    <link rel="stylesheet" type="text/css" href="css/bootstrap/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="css/weixin/main.css"/>
    <script type="text/javascript" src="js/jquery/jquery-1.11.3.js"></script>
    <script type="text/javascript" src="js/iscroll/iscroll-probe.js"></script>
    <script type="text/javascript" src="js/bootstrap/bootstrap.js"></script>
    <script type="text/javascript" src="js/jquery/jquery.form.js"></script>
    <script type="text/javascript" src="js/weixin/toast_tool.js"></script>
</head>
<body>
<div id="header">
    <div class="container-fluid">
        <span>用户登录</span>
    </div>
</div>
<div class="container con_01">
    <form id="login_form" action="/weixin/login" method="post" class="form-signin" role="form">
        <label id="forLogin" for="username" class="form-signin-heading new_log"><img
                src="images/weixin/icon/rr.png"></label>

        <input id="username" name="username" type="text" placeholder="手机号码" class="form-control input1" required
               autofocus>
        <input id="password" name="password" type="password" placeholder="密码" class="form-control input1" required>
        <button type="submit" class="btn btn-small btn-primary btn-block dpink">登录</button>
        <div class="row form-group">
            <div class="col-md-7 link col-md-offset-4">
                <p class="text-center remove-margin">
                    <a href="javascript:void(0)">
                        <small>忘记密码？</small>
                    </a>
                </p>
                <div class="space-line"></div>
            </div>

        </div>
    </form>

    <div id="error_show" class="row"></div>
    <div class="row">
        <p class="text-left width_80">
            <small>新用户需注册</small>
        </p>
        <div class="col-xs-12 col-sm-12 col-md-12">
            <a href="/weixin/register" class="btn btn-small btn-default btn-block gray_b">注册</a>
        </div>
    </div>
</div>


</body>
<script>
    $('#login_form').submit(function () {
        $(this).ajaxSubmit(function (data) {
            if (data.status === 302 && data.redirect) {
                window.location.href = data.redirect;
            }
            if (data.message) {
                Toast("error_show", data.message, 1);
            }
        });
        return false;
    });
</script>
</html>
